#!/usr/bin/env bash

# Rio-scatter: create scatter plot from CSV
# 
# Default colour is 1 (blue)
#
# Example usage:
# curl 'https://raw.githubusercontent.com/pydata/pandas/master/pandas/tests/data/iris.csv' | Rio-scatter SepalLength SepalWidth Name | display
#
# Dependency: Rio
#
# Author: Jeroen Janssens (http://jeroenjanssens.com)

X="$1"
Y="$2"
COLOR="${3:-1}"
Rio -ge "g+geom_point(aes(x=${X},y=${Y},color=${COLOR}))"
